package nl.xs4all.dylanschell.deckprinter.guice;

import com.google.inject.Injector;
import org.apache.wicket.guice.GuiceComponentInjector;
import org.apache.wicket.protocol.http.WebApplication;

import javax.annotation.Nonnull;

public abstract class WicketGuiceApp extends WebApplication
{

    private transient final Injector injector;

    public WicketGuiceApp(Injector injector)
    {
        this.injector = injector;
    }

    @Override
    protected void init()
    {
        addComponentInstantiationListener(new GuiceComponentInjector(this, injector));
    }

}
